home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / p_man / cat3 / f90 / ieee_int.z / ieee_int
Text File  |  1998-10-30  |  4KB  |  89 lines

  1. IEEE_INT(3I)                                           Last changed: 1-6-98
  2.  
  3.  
  4. NNAAMMEE
  5.      IIEEEEEE__IINNTT - Converts _x to an integral value
  6.  
  7. SSYYNNOOPPSSIISS
  8.      IIEEEEEE__IINNTT (([XX==]_x [,, [YY==]_y]))
  9.  
  10. IIMMPPLLEEMMEENNTTAATTIIOONN
  11.      UNICOS/mk and IRIX systems
  12.  
  13.      CRAY T90 systems that support IEEE floating-point arithmetic
  14.  
  15. SSTTAANNDDAARRDDSS
  16.      CF90 and MIPSpro 7 Fortran 90 compiler extension to Fortran 90
  17.  
  18.      IEEE Standard for Binary Floating-point Arithmetic
  19.  
  20. DDEESSCCRRIIPPTTIIOONN
  21.      The IIEEEEEE__IINNTT intrinsic function converts _x to an integral value
  22.      according to the rounding mode currently in effect.  It accepts the
  23.      following arguments:
  24.  
  25.      _x         Must be of type real.  It can be scalar or an array.
  26.  
  27.      _y         If specified, must be scalar and of type integer or real.
  28.  
  29.      IIEEEEEE__IINNTT is an elemental function.  The name of this intrinsic cannot
  30.      be passed as an argument.
  31.  
  32. NNOOTTEESS
  33.      The IEEE intrinsic procedures use the named constants contained in a
  34.      system module, so you must include one of the following statements in
  35.      your program:
  36.  
  37.      * On UNICOS and UNICOS/mk systems:  UUSSEE CCRRII__IIEEEEEE__DDEEFFIINNIITTIIOONNSS
  38.  
  39.      * On UNICOS, UNICOS/mk, and IRIX systems:  UUSSEE FFTTNN__IIEEEEEE__DDEEFFIINNIITTIIOONNSS
  40.  
  41.      The CCRRII__IIEEEEEE__DDEEFFIINNIITTIIOONNSS module is obsolescent.  It will be removed
  42.      for the CF90 4.0 release.
  43.  
  44. RREETTUURRNN VVAALLUUEESS
  45.      The result type and type parameters are as follows.  If _y is absent,
  46.      the result type and type parameter is default integer.  If _y is
  47.      present, the result type and type parameter is the same type and type
  48.      parameter as _y.  If _x is an array, the result is an array of the same
  49.      shape as _x.  A conversion between a floating-point integral value and
  50.      an integer is exact unless an exception arises.
  51.  
  52.      If _y is absent, the result is a default integer rounded from _x
  53.      according to the rounding mode currently in effect.
  54.  
  55.      If _y is present and is of type integer, the result is of type integer
  56.      with the same kind type parameter value as _y and whose value is
  57.      rounded from _x according to the rounding mode currently in effect.
  58.  
  59.      If _y is present and is of type real, the result is of type real with
  60.      the same kind type parameter value as _y and whose value is rounded
  61.      from _x according to the rounding mode currently in effect.  If the
  62.      rounding mode is round-to-nearest and the difference between the
  63.      unrounded value of _x and the rounded result of IIEEEEEE__IINNTT is exacty one
  64.      half, the result of IIEEEEEE__IINNTT is even.
  65.  
  66.      The format of the result value is determined as follows:
  67.  
  68.      * If _x is scalar, the result is a scalar.
  69.  
  70.      * If _x is an array, the result is an array in which each element is
  71.        the value of _x
  72.                      _i
  73.        rounded to the type and type parameter of _y.
  74.  
  75. EEXXAAMMPPLLEESS
  76.           REAL  x
  77.           ...
  78.           PRINT *, IEEE_INT(x, 1)
  79.           PRINT *, IEEE_INT(x, 1.0)
  80.  
  81.      If xx had the value 4.1, the result of the first invocation of IIEEEEEE__IINNTT
  82.      would be integer value 4 and the second result would be the real value
  83.      4.0.
  84.  
  85. SSEEEE AALLSSOO
  86.      _I_n_t_r_i_n_s_i_c _P_r_o_c_e_d_u_r_e_s _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, publication SR-2138, for the
  87.      printed version of this man page.
  88.  
  89.